From: Adel Gadllah Date: Mon, 3 Oct 2011 16:11:59 +0000 (+0200) Subject: WindowDimmer: Don't try to use a ShaderEffect when GLSL is not available X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7512 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=130f2cf80891db16e6fdebc584f2c0c89e3cafef;p=gnome-shell.git WindowDimmer: Don't try to use a ShaderEffect when GLSL is not available This obviously won't work anyway but will just spam stderr with warnings, so don't do it. --- diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 728b13327..ab82c0629 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -37,14 +37,23 @@ function WindowDimmer(actor) { WindowDimmer.prototype = { _init: function(actor) { - this.effect = new Clutter.ShaderEffect({ shader_type: Clutter.ShaderType.FRAGMENT_SHADER }); - this.effect.set_shader_source(getDimShaderSource()); + if (Clutter.feature_available(Clutter.FeatureFlags.SHADERS_GLSL)) { + this.effect = new Clutter.ShaderEffect({ shader_type: Clutter.ShaderType.FRAGMENT_SHADER }); + this.effect.set_shader_source(getDimShaderSource()); + } + else { + this._effect = null; + } this.actor = actor; }, set dimFraction(fraction) { this._dimFraction = fraction; + + if (this.effect == null) + return; + if (!Meta.prefs_get_attach_modal_dialogs()) { this.effect.enabled = false; return;